Session Security Options Structure
When you create an instantiation of the Java runtime environment using theJMOpenSession
function, you must pass a data structure to specify the security levels for that instantiation. The security options data structure is defined by theJMSecurityOptions
data type.
struct JMSecurityOptions { UInt32 fVersion; /* set to kJMVersion */ UInt16 fVerifyMode; /* byte code verification */ Boolean fUseHttpProxy; /* http proxy */ char fHttpProxy[255]; UInt32 fHttpProxyPort; Boolean fUseFTPProxy; /* ftp proxy */ char fFTPProxy[255]; UInt32 fFTPProxyPort; Boolean fUseFirewallProxy; /* firewall proxy */ char fFirewallProxy[255]; UInt32 fFirewallProxyPort; UInt16fNetworkAccess; /* access to the network */ UInt16 fFileSystemAccess; /* access to local file system */ Boolean fRestrictClassAccess; /* access to non-Java class files */ Boolean fRestrictClassDefine; /* access to core class files */ };You can get these security options using the
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion
.fVerifyMode
- A flag indicating which byte codes should be run through the verifier. See "Security Level Indicators" (page 41) for a list of possible values for this field.
fUseHttpProxy
- If set to true, this field indicates an HTTP proxy server is to be used. All requests for data or code must then pass through the HTTP proxy server.
fHttpProxy
- If
fUseHttpProxy
is true, this field contains the name of the HTTP proxy server.fHttpProxyPort
- If
fUseHttpProxy
is true, this field contains the port number of the HTTP proxy server.fUseFTPProxy
- If set to true, this field indicates that an FTP proxy server is to be used. All FTP requests must then pass through the FTP proxy server.
fFTPProxy
- If fUseFTPProxy is true, this field contains the name of the FTP proxy server.
fFTPProxyPort
- If fUseFTPProxy is true, this field contains the port number of the FTP proxy server.
fUseFirewallProxy
- If set to true, this field indicates a firewall proxy server is to be used. All requests for data or code must then pass through the firewall proxy server.
fFirewallProxy
- If
fUseFirewallProxy
is true, this field contains the name of the firewall proxy server.fFirewallProxyPort
- If
fUseFirewallProxy
is true, this field contains the port number of the firewall proxy server.fNetworkAccess
- A flag indicating access privileges for applets connecting to networks. See "Security Level Indicators" (page 41) for a list of possible values for this field.
fFileSystemAccess
- A flag indicating applet access privileges to the local file system. See "Security Level Indicators" (page 41) for a list of possible values for this field.
fRestrictClassAccess
- If set to true, an applet cannot access non-Java class files (that is, those not in the
java.*
hierarchy).fRestrictClassDefine
- If set to true, an applet cannot define a class in the
java.*
hierarchy.JMGetSecurityOptions
function (page 58) or change them using theJMSetSecurityOptions
function (page 58).